<extend name="./public/frame.html"/>
<block name="content">
	<blockquote class="layui-elem-quote search">
		<div class="layui-inline">
			<input type="text" name="user_phone" lay-verify="required|title" required placeholder="请输入手机号" class="layui-input" id="user_phone">
		</div>
		<div class="layui-inline">
			<select id="statusType" name="statusType" class="layui-input" style="width: 120px;">
				<option value="">状态</option>
				<option value="1">收入</option>
				<option value="2">支出</option>
			</select>
		</div>
		<div class="layui-inline">
			<select id="is_status" name="is_status" class="layui-input" style="width: 120px;">
				<option value="">到账状态</option>
				<option value="1">已到账</option>
				<option value="2">未到账</option>
			</select>
		</div>
		<div class="layui-inline">
			<button class="layui-btn" data-type="search">搜索</button>
		</div>
	</blockquote>
	<table class="layui-table" lay-data="{width:'auto', height:'auto', url:'{:url('UserIntegral/look')}', page: true, limit: 10,where: { uid: <?php echo $uid;?>} , id:'UserIntegral'}" lay-filter="UserIntegral">
		<thead>
		<tr>
			<th lay-data="{field:'id', width:70,fixed: true, sort: true,align:'center',fixed: true}">ID</th>
			<th lay-data="{field:'uid', width:100,align:'center'}">用户UID</th>
			<th lay-data="{field:'user_phone', width:120,align:'center'}">手机号</th>
			<th lay-data="{field:'amount', width:130,align:'center'}">积分(收入/支出)</th>
			<th lay-data="{field:'statusName', width:100,align:'center'}">到账状态</th>
			<th lay-data="{field:'typeName', width:120,align:'center'}">积分类型</th>
			<th lay-data="{field:'common_id', width:100,align:'center'}">商城订单ID</th>
			<th lay-data="{field:'order_sn', width:200,align:'center'}">订单号</th>
			<th lay-data="{field:'original_amount', width:90,align:'center'}">原价(元)</th>
			<th lay-data="{field:'orginal_selling_price', width:90,align:'center'}">售价(元)</th>
			<th lay-data="{field:'orginal_cost_price', width:100,align:'center'}">成本价(元)</th>
			<th lay-data="{field:'first_referee_id', width:100,align:'center'}">一级推荐人</th>
			<th lay-data="{field:'second_referee_id', width:100,align:'center'}">二级推荐人</th>
			<th lay-data="{field:'account_time', width:160,align:'center'}">到账时间</th>
			<th lay-data="{fixed:'right',field:'add_time', width:160,align:'center'}">生成时间</th>
		</tr>
		</thead>
	</table>
	<script>
		layui.use(['table'], function () {
			var table = layui.table;
			//搜索
			$('.layui-btn').on('click', function () {
				var user_phone 	= $("#user_phone").val();
				var statusType 	= $("#statusType").val();
				var is_status 	= $("#is_status").val();
				table.reload('UserIntegral', {
					url: '/admin/UserIntegral/look', where: {
						"user_phone": user_phone,
						"statusType": statusType,
						"is_status": is_status,
					}
				});
			});
		});
	</script>
</block>
